public class Car2 {
    String lun;
    String chejia;
    String dipan;
    String fandong;
    Car1 p;

    public void print() {
        System.out.println("汽车是由" + lun + chejia + dipan + fandong + "组成");
        System.out.println("发动机信息如下");
        p.print();

    }

    public void start() {
        System.out.println("开始启动");
    }

    public void stop() {
        System.out.println("停止汽车");
    }

    public void mindi() {
        System.out.println("鸣笛功能");
    }
}
